package Demo1;

import java.util.Scanner;
import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-09-06
 * Time: 8:52
 */

public class Test {
    static class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        public TreeNode(int val) {
            this.val = val;
        }
    }

    public static void PostorderTraversal(TreeNode root){
        if(root == null) return ;
        Stack<TreeNode> stack = new Stack<>();
        stack.push(root);
        TreeNode cur = root;
        while(!stack.isEmpty()){
            while(cur != null){
                stack.push(cur);
                cur = cur.left;
            }

            //左边走完了
            cur = cur.right;
            if(cur == null){
                System.out.println(cur.val + " ");
                stack.pop();
                cur = stack.peek();
            }
        }
    }
    public static Scanner input = new Scanner(System.in);
    public static void main(String[] args) {
        int math = input.nextInt();
        int english = input.nextInt();
        int chinese = input.nextInt();
        float avg = (math + english + chinese) / 3.0f;
        int val = Math.max(math,english);
        System.out.println(Math.max(val,chinese));
        int val1 = Math.min(math,english);
        System.out.println(Math.min(val1,chinese));
    }
}
